import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import VueRouter from 'vue-router'
import axios from 'axios'

import ClazzPage from './views/ClazzPage'
import StudentPage from './views/StudentPage'
import LoginPage from './views/LoginPage'

import 'element-ui/lib/theme-chalk/index.css'

Vue.use(VueRouter)
Vue.use(ElementUI)

axios.defaults.baseURL = 'http://localhost:9624'

Vue.prototype.$axios = axios
Vue.config.productionTip = false

const router = new VueRouter({
    mode: 'history',
    routes: [
        {
            path: '/',
            component: LoginPage
        },
        {
            path: '/class',
            component: ClazzPage
        },
        {
            path: '/student',
            component: StudentPage
        }
    ]
})

new Vue({
    router,
    render: h => h(App),
}).$mount('#app')
